let currentURL = window.location.href
var ua = navigator.userAgent.toLowerCase()
// let device_info = [ 'iPhone', 'Android' ]
// let app_info = [ '其他', 'remix', '糗事百科', 'QQ', '微信', '微博' ]
let get_device_info = function() {
  if ( ua.match( 'android' ) ) {
    return 1
  } else {
    return 0
  }
}
let get_app_info = function() {
  if ( ua.match( 'remix' ) ) {
    return 1
  } else if ( ua.match( 'qiubai' ) ) {
    return 2
  } else if ( ua.match( 'qq' ) ) {
    return 3
  } else if ( ua.match( 'micromessenger' ) ) {
    return 4
  } else if ( ua.match( 'weibo' ) ) {
    return 5
  } else {
    return 0
  }
}
let config = {
  // 是否是主播
  isAnchor: serverData.isAnchor ? true : false,
  // 是否在糗事百科的直播或者分享出去的页面里面里面
  qiubaizhibo: ( window.location.href.match( 'qiubaizhibo' ) && !window.location.href.match( 'from' ) ) ? true : false,
  //判断设备和APP
  app: get_app_info(),
  device: get_device_info(),
  login_info:serverData.login_info,
  inapp_info:serverData.inapp_info,
  download:serverData.download,
}
export default config
